package indi.kider.server.employee.service;

import indi.kider.common.model.apartment.Community;
import indi.kider.common.model.employee.Employee;
import indi.kider.common.model.employee.Enterprise;
import pers.vankid.common.model.base.CommonResponse;
import pers.vankid.common.utils.page.PageRequest;
import pers.vankid.common.utils.page.PageResponse;

import java.util.List;

/**
 * Created by shixj on 2018/4/26.
 */
public interface EnterpriseService {
    /**
     * 根据id获取
     * @param id
     * @return
     */
    Enterprise getEnterpriseById(Long id);

    /**
     * 获取分页查询
     * @param request
     * @return
     */
    PageResponse<List<Enterprise>>getEnterprisePages(PageRequest<Enterprise> request);
    PageResponse<List<Enterprise>>getEnterprisePages(PageRequest<Enterprise> request,Employee employee);

    /**
     * 不分页查询
     * @param enterprise
     * @return
     */
    List<Enterprise>getEnterprises(Enterprise enterprise,Employee employee);
    /**
     * 获取合作企业
     * @param community
     * @return
     */
    List<Enterprise>getEnterprisesByCommunityId(Community community);

    List<Enterprise>getEnterprisesByHouseId(Long houseId);

    /**
     * 新增
     * @param enterprise
     * @return
     */
    Enterprise add(Enterprise enterprise);

    /**
     * 更新
     * @param enterprise
     * @return
     */
    Enterprise modify(Enterprise enterprise);
    /**
     * 删除
     */
    CommonResponse delById(Long id);
}
